<template>
	<view class="start">
		<view class="smart-page-wrap">
			<swiper circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
				:duration="duration" @change="goDetailPage">
				<swiper-item>
					<view class="swiper-item">
						<image
							src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.dtstatic.com%2Fuploads%2Fblog%2F202108%2F27%2F20210827232450_ac6ca.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.dtstatic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1670491553&t=0a9f60619237c7b7935a6f2e8330ca6e"
							mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../../static/yuanshen/lulaoye.webp" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../../static/yuanshen/jiangju.webp" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image src="../../../static/yuanshen/shenhe.webp" mode=""></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				indicatorDots: true,
				autoplay: true,
				interval: 3000,
				duration: 500
			}
		},
		methods: {
			goDetailPage(e) {
				let idx = e.detail.current;
				if (idx == 3) {
					uni.redirectTo({
						url: '/pages/index/index'
					});
				}
			}
		}
	}
</script>

<style>
	image {
		height: 100vh;
		width: 100%;
		background-color: aqua;
	}

	swiper {
		height: 100vh;
	}
</style>
